package com.xinhe.web.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "会员优惠劵详情")
@Table(name = "tb_member_coupon")
public class MemberCoupon {
    @Id
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("会员id")
    private Long userId;
    @ApiModelProperty("优惠劵id")
    private Long couponId;
    @ApiModelProperty("名称")
    private String name;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("截止有效期")
    private Date expireTime;
    @ApiModelProperty("金额")
    private BigDecimal money;
    @ApiModelProperty("满足金额")
    private BigDecimal satisfyMoney;
    @ApiModelProperty("状态  NOT_USE(\"待使用\"),USE(\"已使用\"),EXPIRE(\"已过期\");")
    private String status;
}
